package com.cnhis.cloudhealth.clinical.hosnurse.hosdiagnose.bo;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cnhis.cloudhealth.clinical.hosnurse.hosdiagnose.dao.HosDiagnoseDao;
import com.cnhis.cloudhealth.commons.Mappers.ModelVo;
import com.cnhis.cloudhealth.commons.utils.Page;
import com.cnhis.cloudhealth.commons.utils.StaticKeys;

@Service
public class HosDiagnoseBo {
 @Resource
 private HosDiagnoseDao hosDiagnoseDao;
 public ModelVo personItemsList(Map map,int currPage,int pageSize)throws Exception{
	 ModelVo mo = new ModelVo();
		Page page =null;
		try {
			page=hosDiagnoseDao.personItemsList(map,currPage,pageSize);
			
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		mo.setList(page.getList());
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(page.getList());
		return mo;
 }
 public ModelVo personTreatmentCase(Map map,int currPage,int pageSize)throws Exception{
	 ModelVo mo = new ModelVo();
		Page page =null;
		try {
			page=hosDiagnoseDao.personTreatmentCase(map,currPage,pageSize);
			
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		mo.setList(page.getList());
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(page.getList());
		return mo;
 }
 public ModelVo personTreamentList(Map map)throws Exception{
	 ModelVo mo = new ModelVo();
		List ls =null;
		try {
			ls=hosDiagnoseDao.personTreamentList(map);
			
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		mo.setList(ls);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(ls);
		return mo;
 }
 public ModelVo getAdviceLimit(Map map)throws Exception{
	 ModelVo mo = new ModelVo();
		List ls =null;
		try {
			ls=hosDiagnoseDao.getAdviceLimit(map);
			
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		mo.setList(ls);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(ls);
		return mo;
 }
 public ModelVo queryCurrentCase(Map map)throws Exception{
	 ModelVo mo = new ModelVo();
		List ls =null;
		try {
			ls=hosDiagnoseDao.queryCurrentCase(map);
			
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		mo.setList(ls);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(ls);
		return mo;
 }
 public ModelVo queryTreatment(Map map)throws Exception{
	 ModelVo mo = new ModelVo();
		List ls =null;
		try {
			ls=hosDiagnoseDao.queryTreatment(map);
			
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		mo.setList(ls);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(ls);
		return mo;
 }
 public ModelVo getTreatmentById(Map map)throws Exception{
	 ModelVo mo = new ModelVo();
		List ls =null;
		try {
			ls=hosDiagnoseDao.getTreatmentById(map);
			
		} catch (Exception e) {
			e.printStackTrace();
			mo.setResult(StaticKeys.OH_FALSE);
			return mo;
		}
		mo.setList(ls);
		mo.setResult(StaticKeys.OH_SUCCESS);
		mo.setRows(ls);
		return mo;
 }
}
